class User{
    public readonly name:string;
    private age:number;
    constructor(name:string,age:number){
        this.name = name;
        this.age = age;
    }
    public getAge(){
        return this.age;
    }
}

const u = new User("wangwu",18);
// u.name = '12';
u.getAge();
